#pragma once

#include "fxcc/core/graph/common/pch.h"
#include "fxcc/core/graph/common/MeshData.h"
#include "fxcc/core/graph/common/MaterialData.h"
#include "fxcc/core/graph/common/Animation.h"
#include "fxcc/core/graph/common/Node.h"
#include "fxcc/core/graph/common/CameraData.h"
#include "fxcc/core/graph/common/LightData.h"
#include "fxcc/core/graph/common/AABB.h"

namespace fxcc
{
    namespace graph
    {
        namespace common
        {

            struct FXCC_API    Scene
            {
                bool m_Enabled;

                std::string m_Name;

                std::string m_Path;

                AABB m_AABB;

                std::shared_ptr<Node> m_RootNode;

                std::map<std::string, Bone> m_Bones;

                std::vector<std::shared_ptr<MeshData>> m_MeshDatas;

                std::vector<std::shared_ptr<Animation>> m_Animations;

                std::vector<std::shared_ptr<MaterialData>> m_Materials;

                std::vector<std::shared_ptr<CameraData>> m_Cameras;

                std::vector<std::shared_ptr<LightData>> m_LightDatas;

                Scene() = default;

                Scene(const std::string &path);

                bool Create(const std::string &path);

                bool Create(const aiScene *source, const std::string &path);

                void CalAABB(const AABB &other);

                bool IsAvailed(const aiScene* scene);

                void ProcessNode(fxcc::graph::common::Node* node);

            };
        };
    };
};
